package com.briup.cms.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.briup.cms.bean.Slideshow;
import com.briup.cms.service.impl.SlideshowServiceImpl;
import com.briup.cms.util.Result;
import com.sun.org.apache.regexp.internal.RE;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author briup
 * @since 2023-11-14
 */
@Api(tags = "测试模块")
@RestController
@RequestMapping("/slideshow")
public class SlideshowController {
    @Autowired
    private SlideshowServiceImpl slide;

    @ApiOperation(value = "测试类")
    @GetMapping("/selAll")
    public Result selAll() {
        List<Slideshow> slideshows = slide.selAll();
        return Result.success(slideshows);
    }
    @ApiOperation(value = "分页查询")
    @GetMapping("/selPage")
    public Result selPage(){
        IPage<Slideshow> iPage = slide.selOne();
        return Result.success(iPage);
    }
}

